package com.albbz;

public class Pentagon extends Shape {
	public Pentagon(int row) {

		super(row);
	}

	@Override

	public void draw() {

		for (int i = 1; i <=super.getRow(); i++) {

			for (int j = 0; j <super.getRow()-i+1; j++) {

				System.out.print(" ");

			}

			if(i==1) {

				System.out.print("*");

			}

			else {

				for (int k = 1; k <=2*i; k++) {

					System.out.print("*");

				}

			}

			System.out.println();

		}

		for (int i = 0; i <=2; i++) {

			for (int j = -2; j < i; j++) {

				System.out.print(" ");

			}

			for (int k = 0; k <8-2*i; k++) {

				System.out.print("*");
			}

			System.out.println();

			if(i==5) {

				System.out.println("*");

			}

		}

	}


}
